Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- Lawsuit case



  Some short code snippets which use all JavaScript keywords

In JavaScript, keywords are reserved and cannot be used as variable or function names. For example void, function and this are JavaScript keywords, they are keywords which are reserved for special use. Here is list of the keywords in JavaScript. We also show you some short code snippets which use all the keywords in JavaScript.void function() {//abcd   do break;while(typeof delete this);  for(var a;;)  if (true)  with(null)  try{}catch(a){}finally{} else throw new 1;&nbs...

   Code snippet,JavaScript,keyword     2012-07-16 12:12:05

  Get associated file icon with only extension name using C++ on Windows

I have searched on Google for a few examples on how to get associated file icon with only file extension name using C++ on Windows. There are some useful information provided on MSDN which explains the use of SHGetFileInfo() function.It also gives an example code, but it doesn't say how to do it with only the extension name.  Here I give an example code on how to achieve this after I gathered and summarized some  useful information from Internet. I have tested the code on my PC, it w...

   File icon,Windows,Association,Extension name,C++     2012-03-26 09:55:20

  How to undo git changes?

When using git for version control, there is frequent need on undoing commits due to some unexpected changes. This post will introduce how to undo changes with git command in different cases. Undo commit A common undo case is that some commit needs to be reverted as the commit contains error. In this case, the code is already committed. The command to revert the commit is git revert HEAD This command will add new a commit to the existing head to undo the previous commit. It will not change the p...

   GIT,GIT RESET,GIT REVERT,GIT CHECKOUT     2019-12-28 02:21:47

  Java SynchronizedList and Iterator

While reading some material about concurrency, I come up with some writing about using SynchronizedList wrap about normal List to enable synchronization.   But one interesting thing is http://docs.oracle.com/javase/7/docs/api/java/util/Collections.html#synchronizedList%28java.util.List%29   It says     It is imperative that the user manually synchronize on the returned list when iterating over it:     1   List list = Collections.synchronizedList(new A...

       2015-12-03 03:04:08

  Samsung Overtakes Apple as World’s Biggest Smartphone Seller

Oct. 28 (Bloomberg) -- Samsung Electronics Co. overtook Apple Inc. in the last quarter to become the world’s largest smartphone vendor amid a widening technology and legal battle between the two companies.Samsung shipped 27.8 million smartphones in the last quarter, taking 23.8 percent of the market, Milton Keynes, U.K.- based Strategy Analytics said in an e-mailed statement today. Apple’s 17.1 million shipments, comprising 14.6 percent of the market, pushed the Cupertino, Californ...

   Samsung,Apple,Samrtphone,Overtake,Samsung No. 1     2011-10-28 10:18:12

  Be careful about nil check on interface in GoLang

nil check is frequently seen in GoLang code especially for error check since GoLang's special error handling convention. In most cases, nil check is straight forward, but in interface case, it's a bit different and special care needs to be taken. Take a look at below code snippet and guess what the output will be. package main import ( "bytes" "fmt" "io" ) func check(w io.Writer) { if w != nil { fmt.Println("w is not nil") } fmt.Printf("w is %+v\n", w) } func main() { var b *bytes.B...

   INTERFACE,GOLANG,NIL CHECK,NIL TYPE,NIL VALUE     2019-04-06 07:47:07

  Net Neutrality is Dead - and Web Development Will Never Be The Same Again

Against the wishes of web users and tech businesses alike, the FCC has pushed through regulations to kill net neutrality. Here’s what that means for web developers. On December 14, 2017, the FCC voted in a 3-2 decision to roll back the Obama administration’s 2015 net neutrality rules. These policies, which demanded stronger oversight for broadband companies and internet service providers, ensured that all data on the web was treated equally. Most importantly, they prevented web traf...

       2019-05-02 21:55:53

  How to forcibly eject a CD/DVD from a MacBook Air USB SuperDrive

So you've got a DVD stuck in the external USB SuperDrive that connects to the MacBook Air? And you've tried hitting the magic Eject button on the keyboard to no avail?And you've tried drutil tray eject at the command-line? And you've tried booting with Option held down and clicking eject? And you've tried plugging the drive into other machines (Macs, Windows PCs, Linux machines) to no avail?What do you do?Clearly you hit the physical eject button, right? Every DVD drive has one of those. On the ...

   Apple,Macbook,USB Drive,Ejection     2011-11-17 08:39:56

  Alibaba gains spotlight due to female employee alleging sex harassment from supervisor

During the weekend, the Chinese e-commerce giant Alibaba gains spotlight from Chinese general public due to a hot discussion going on on various Chinese social media platforms where a female employee alleges that her supervisor(alias Yi Qu) conducted sex harassment on her during a previous business trip. The case happened a couple of weeks back where the female employee at Alibaba was asked by her direct supervisor to go for a business trip to Shandong province(a northern province in China), sh...

   ALIBABA,SEX HARASSMENT     2021-08-07 22:27:02

  Add ContextMenu to a customized View in Android

In Android, we may sometimes need to add ContextMenu to a View, it's not so easy to add ContextMenu to a customized View. Here we explain how to add ContextMenu to a customized View. First, we may need to create View.OnCreateContextMenuListener so that the customized view can register for it. Here is the class definition: public class GraphView extends View {     private View.OnCreateContextMenuListener vC = new View.OnCreateContextMenuListener() {       &...

   Android, ContextMenu,Customized view     2012-11-04 07:10:40